package com.water.bs.service;

import com.water.bs.mapper.UserGiftMapper;
import com.water.bs.pojo.Gift;
import com.water.bs.pojo.GiftHistory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserGiftService {
    @Autowired
    private UserGiftMapper userGiftMapper;

    public List<Gift> queryAbleGift(){
        return userGiftMapper.queryAbleGift();
    }

    public int cancelGiftBuy(String id){return userGiftMapper.cancelGiftBuy(id);}

    public int exchangeGift(Map<String,Object>map){
        return userGiftMapper.exchangeGift(map);
    }

    public List<Map<String,Object>> qryGiftHistory(String id){
        return userGiftMapper.qryGiftHistory(id);
    }

    public Gift qryGiftById(String id){return userGiftMapper.qryGiftById(id);}
}
